package com.k.demo.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.ResultMap;
import org.apache.ibatis.annotations.Select;

import com.k.demo.entity.Power;



@Mapper
public interface PowerMapper {
	
	@Select("select * from power where is_delete=1")
	List<Power> selectAll();
	
	@Select("select * from power where power_id=#{power_id} and is_delete=1")
	Power selectById(int power_id);
	
	@ResultMap("PowerWithUser")
	@Select("select * from power where power_id=#{power_id} and is_delete=1")
	Power selectByIdWithUser(int power_id);
}
